-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wi-Fi shell improvs #1429
Merged
Merged
Wi-Fi shell improvs #1429
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sachinthegreen
requested changes
Dec 22, 2023
7b6de01
to
d487645
Compare
All WiFi channel numbers fit within a 8 bit number, as the maximum allocated channel is 233. This halves the memory requirement. Signed-off-by: Jordan Yates <[email protected]> (cherry picked from commit dd090f0)
Remove the wifi_mgmt interface overriding default values with values from kconfig. The defaults were only applied when a `params` struct was provided by the application. This is the case when the application is explicitly setting the options it wants, why is the mgmt API changing these. When `params` is NULL and thus modem defaults are requested, these defaults aren't applied. This is the opposite behaviour from what seems reasonable. In addition, these options are: * Undocumented * Using non-trivial string parsing functions (strtok) * Adding complexity to the API implementation by forcing support for ROM versions of command line arguments. Signed-off-by: Jordan Yates <[email protected]> (cherry picked from commit 5452665)
Make the maximum number of channels that can be manually scanned configurable by the application. The previous value of 233 was vastly overallocating memory as the largest band only contains 60 allocated channels. Signed-off-by: Jordan Yates <[email protected]> (cherry picked from commit 6a428f1)
Turn the nested arrays of `scan_params->chan` into a single array. This adds the requirement to specify the band for each channel, but eliminates the large amount of dead memory for unused bands. Overall, this saves 50% of the RAM space for this variable. Signed-off-by: Jordan Yates <[email protected]> (cherry picked from commit b54951b)
Instead of providing a comma seperated list of SSIDs, provide the SSIDs individually. This substantially simplifies the implementation. Signed-off-by: Jordan Yates <[email protected]> (cherry picked from commit 3b7237e)
Re-add the `WIFI_MGMT_FORCED_PASSIVE_SCAN` option removed in #62751. Now that `struct wifi_scan_params` is a reasonable size, we can enforce the passive scan request even when no parameter struct is supplied by the user. Signed-off-by: Jordan Yates <[email protected]> (cherry picked from commit 2b92598)
Update the storage type of the SSID strings to pointers to the strings, instead of needing to copy the strings into the struct. This substantially reduces the parameter struct size. Signed-off-by: Jordan Yates <[email protected]> (cherry picked from commit a32e7aa)
Missed accounting for "-f" option. Upstream PR: zephyrproject-rtos/zephyr#66876 Signed-off-by: Chaitanya Tata <[email protected]>
Fix an extra optional arg. Upstream PR: zephyrproject-rtos/zephyr#66876 Signed-off-by: Chaitanya Tata <[email protected]>
Clearly mark the args as optional. Upstream PR: zephyrproject-rtos/zephyr#66876 Signed-off-by: Chaitanya Tata <[email protected]>
We are using standard notation to differentiate optional and mandatory, so, no need for a heading. Upstream PR: zephyrproject-rtos/zephyr#66876 Signed-off-by: Chaitanya Tata <[email protected]>
Separate the two optional parameters and add help. Upstream PR: zephyrproject-rtos/zephyr#66876 Signed-off-by: Chaitanya Tata <[email protected]>
The parameters heading is implied and doesn't have the newline, so, just remove it. Upstream PR: zephyrproject-rtos/zephyr#66876 Signed-off-by: Chaitanya Tata <[email protected]>
For better readability, below rules will help: * Each command should be separated by a newline * Each command should end with a full stop (intermediate statements shouldn't have full stops) Upstream PR: zephyrproject-rtos/zephyr#66876 Signed-off-by: Chaitanya Tata <[email protected]>
Just a cosmetic change, but IMHO the help looks much better now :). Upstream PR: zephyrproject-rtos/zephyr#66876 Signed-off-by: Chaitanya Tata <[email protected]>
d487645
to
42fe4d0
Compare
FYI, for a single line change in help, had to pull in many of the scan re-work fromtree commits, as upmerge is still pending. |
sachinthegreen
approved these changes
Dec 27, 2023
trantanen
reviewed
Dec 27, 2023
rado17
approved these changes
Dec 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.